package _12interface.homework4;

public abstract class Shape {
    public abstract double getCir();
    public abstract double getArea();
}
class Rectangle extends Shape{
    private double a;
    private double b;

    public void setA(double a) {
        this.a = a;
    }

    public void setB(double b) {
        this.b = b;
    }


    @Override
    public double getCir() {
        return 2*a+2*b;
    }

    @Override
    public double getArea() {
        return a*b;
    }
}
class Circle extends Shape{
    private double radius;

    public void setRadius(double radius) {
        this.radius = radius;
    }

    @Override
    public double getCir() {
        return 2*3.14*radius;
    }

    @Override
    public double getArea() {
        return 3.14*radius*radius;
    }
}

